#ifndef _CONFIG_H
#define _CONFIG_H

/*----------------About Control Mode--------------------*/
#define OPEN_LOOP_VELOCITY      (0)
#define CLOSE_LOOP_ANGLE        (1)
#define MOTOR_CONTROL_MODE        (OPEN_LOOP_VELOCITY)


/*----------------About BLDC Motor--------------------*/
#define MOTOR1_POLE_PAIR_NUM         (11) //电机1：极对数
#define MOTOR2_POLE_PAIR_NUM        (11)  //电机2：极对数



/*----------------About BLDC Driver-------------------*/
//正面M0 == 背面M1
#define M0_PWMA_PIN                 (3)
#define M0_PWMB_PIN                 (5)
#define M0_PWMC_PIN                 (6)
#define M0_PWM_EN                   (7)

//正面M1 == 背面M2
#define M1_PWMA_PIN                 (9)
#define M1_PWMB_PIN                 (10)
#define M1_PWMC_PIN                 (11)
#define M1_PWM_EN                   (8)

/*----------------About BLDC Sensor-------------------*/
//采用磁编码器ADC引脚输出模式
#define M0_MAGNETIC_ANALOG_SENSOR_PIN               (A7)
#define M0_MAGNETIC_ANALOG_SENSOR_MIN               (0)
#define M0_MAGNETIC_ANALOG_SENSOR_MAX               (1024)


#define M1_MAGNETIC_ANALOG_SENSOR_PIN               (A6)
#define M1_MAGNETIC_ANALOG_SENSOR_MIN               (0)
#define M1_MAGNETIC_ANALOG_SENSOR_MAX               (1024)

/*----------------About BLDC DianliuCaiyang------------------*/
#define LED_PIN   13



#endif 
